package model.components.nodes.node.virtual;

import model.components.nodes.node.Node;

public class VirtualSwitch extends VirtualNode
{
	public VirtualSwitch( String networkName, int startingDate, int endingDate, int number, String os, int cpu, int ram )
	{
		super( networkName, startingDate, endingDate, VirtualSwitch.class.getSimpleName(), number, Node.SWITCH_TYPE, os, cpu, ram, Node.GREY_SWITCH, Node.GREEN_SWITCH, Node.YELLOW_SWITCH, Node.RED_SWITCH );
	}
	
	@Override
	public VirtualSwitch getCopy()
	{
		VirtualSwitch virtualSwitch = new VirtualSwitch( this.getNetworkName(), this.getStartingDate(), this.getEndingDate(), this.getNumber(), this.getOS(), this.getCPU(), this.getRAM() );
		virtualSwitch.setInitialNumber( this.getInitialNumber() );
		virtualSwitch.setNamePrefix( this.getNamePrefix() );
		virtualSwitch.setType( this.getType() );
		virtualSwitch.setTimeStamp( this.getTimeStamp() );
		
		if( this.getSdnNode() != null )
			virtualSwitch.setSdnNode( this.getSdnNode().getSoftCopy() );
		
		virtualSwitch.setSelected( this.isSelected() );
		virtualSwitch.setCPUprice( this.getCPUprice() );
		virtualSwitch.setRAMprice( this.getRAMprice() );
		
		return virtualSwitch;
	}
	
}
